package com.xtwv4love.springboot.controller;

import com.xtwv4love.springboot.pojo.Student;
import com.xtwv4love.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {

    @Autowired
    private StudentService studentService;

    @RequestMapping("/listAllStudent")
    public List<Student> listStudent() {
        List<Student> list = studentService.finaAllStudents();
        return list;
    }
}
